/**
 * 
 */
package org.chungyan5.flashcard;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * @author yan
 *
 */
public class AbcCapital implements Lesson {

	private int cnt = 26;

	public AbcCapital() {
	}

	public AbcCapital(Parcel source) {
		cnt = source.readInt();
	}

	@Override
	public int getCnt() {
		return cnt;
	}

	@Override
	public String convert(int index) {
        // general a,b,c ... z in seq. 
        String sequenceElement = "";
        sequenceElement +=  (char) ('A' + index);
		return sequenceElement;
	}

	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeInt(cnt);
	}

	/**
	 * It will be required during un-marshaling data stored in a Parcel
	 * @author prasanta
	 */
	public static final Parcelable.Creator<AbcCapital> CREATOR = new Parcelable.Creator<AbcCapital>() {  
	    
        public AbcCapital createFromParcel(Parcel in) {  
            return new AbcCapital(in);  
        }  
   
        public AbcCapital[] newArray(int size) {  
            return new AbcCapital[size];  
        }  
          
    };
}
